package com.ruoyi.db.domain;

import java.math.BigDecimal;

import cn.hutool.core.util.StrUtil;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 总账户流水对象 ml_account_info_his
 * 
 * @author ruoyi
 * @date 2023-02-02
 */
public class AccountInfoHis extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /**  */
    private Long id;

    /** 账户ID */
    @Excel(name = "账户ID")
    private Long accountId;

    /** 账户名称 */
    @Excel(name = "账户名称")
    private String accountName;

    /** 账户类型 */
    @Excel(name = "账户类型")
    private String accountType;

    /** 账户姓名 */
    @Excel(name = "账户姓名")
    private String accountUser;

    /** 账户编号 */
    @Excel(name = "账户编号")
    private String accountNo;

    /** 操作类型 (  ADJUST 调账)（INCOME 收入）（PAYOUT 支出） */
    @Excel(name = "操作类型 (  ADJUST 调账)", readConverterExp = "I=NCOME,收=入")
    private String actionType;

    /** 修改金额 */
    @Excel(name = "修改金额")
    private BigDecimal changeAmount;

    /** 原余额 */
    @Excel(name = "原余额")
    private BigDecimal originAmount;

    /** 现余额 */
    @Excel(name = "现余额")
    private BigDecimal currentAmount;

    /** 状态（1 可用）（0 不可用） */
    @Excel(name = "状态", readConverterExp = "1=,可=用")
    private Long status;

    /**  */
    @Excel(name = "")
    private String dataId;

    /**  */
    @Excel(name = "")
    private String dataType;

    /**  */
    @Excel(name = "")
    private String dataRemark;

    /** 操作员ID */
    @Excel(name = "操作员ID")
    private String operatorId;

    /** 操作员姓名 */
    @Excel(name = "操作员姓名")
    private String operatorName;

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    private String imgUrl;

    public String startCreateTime;

    public String endCreateTime;

    public String createTime;

    public String getStartCreateTime(){
        if (StrUtil.isNotEmpty(createTime) && StrUtil.isEmpty(startCreateTime)){
            String[] split = createTime.split("~");
            this.startCreateTime = split[0];
            return startCreateTime;
        }
        return startCreateTime;
    }

    public String getEndCreateTime(){
        if (StrUtil.isNotEmpty(createTime) && StrUtil.isEmpty(endCreateTime)){
            String[] split = createTime.split("~");
            this.endCreateTime = split[1];
            return endCreateTime;
        }
        return endCreateTime;
    }

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setAccountId(Long accountId) 
    {
        this.accountId = accountId;
    }

    public Long getAccountId() 
    {
        return accountId;
    }
    public void setAccountName(String accountName) 
    {
        this.accountName = accountName;
    }

    public String getAccountName() 
    {
        return accountName;
    }
    public void setAccountType(String accountType) 
    {
        this.accountType = accountType;
    }

    public String getAccountType() 
    {
        return accountType;
    }
    public void setAccountUser(String accountUser) 
    {
        this.accountUser = accountUser;
    }

    public String getAccountUser() 
    {
        return accountUser;
    }
    public void setAccountNo(String accountNo) 
    {
        this.accountNo = accountNo;
    }

    public String getAccountNo() 
    {
        return accountNo;
    }
    public void setActionType(String actionType) 
    {
        this.actionType = actionType;
    }

    public String getActionType() 
    {
        return actionType;
    }
    public void setChangeAmount(BigDecimal changeAmount) 
    {
        this.changeAmount = changeAmount;
    }

    public BigDecimal getChangeAmount() 
    {
        return changeAmount;
    }
    public void setOriginAmount(BigDecimal originAmount) 
    {
        this.originAmount = originAmount;
    }

    public BigDecimal getOriginAmount() 
    {
        return originAmount;
    }
    public void setCurrentAmount(BigDecimal currentAmount) 
    {
        this.currentAmount = currentAmount;
    }

    public BigDecimal getCurrentAmount() 
    {
        return currentAmount;
    }
    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }
    public void setDataId(String dataId) 
    {
        this.dataId = dataId;
    }

    public String getDataId() 
    {
        return dataId;
    }
    public void setDataType(String dataType) 
    {
        this.dataType = dataType;
    }

    public String getDataType() 
    {
        return dataType;
    }
    public void setDataRemark(String dataRemark) 
    {
        this.dataRemark = dataRemark;
    }

    public String getDataRemark() 
    {
        return dataRemark;
    }
    public void setOperatorId(String operatorId) 
    {
        this.operatorId = operatorId;
    }

    public String getOperatorId() 
    {
        return operatorId;
    }
    public void setOperatorName(String operatorName) 
    {
        this.operatorName = operatorName;
    }

    public String getOperatorName() 
    {
        return operatorName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("accountId", getAccountId())
            .append("accountName", getAccountName())
            .append("accountType", getAccountType())
            .append("accountUser", getAccountUser())
            .append("accountNo", getAccountNo())
            .append("actionType", getActionType())
            .append("changeAmount", getChangeAmount())
            .append("originAmount", getOriginAmount())
            .append("currentAmount", getCurrentAmount())
            .append("status", getStatus())
            .append("dataId", getDataId())
            .append("dataType", getDataType())
            .append("dataRemark", getDataRemark())
            .append("operatorId", getOperatorId())
            .append("operatorName", getOperatorName())
            .append("createTime", getCreateTime())
            .append("imgUrl", getImgUrl())
            .toString();
    }
}
